package com.zsrt.devbase.common.utils;

import java.util.HashMap;
import java.util.Map;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;

public class ToHashMapUtil {
	
	//json对象转化成map
	public static  Map<String, Object> toHashMap(String json)  
	   {  
     Map<String, Object> map = new HashMap<String, Object>();  
     ObjectMapper mapper = new ObjectMapper();  
       
     try{  
         map = mapper.readValue(json, new TypeReference<HashMap<String,Object>>(){});  
         System.out.println(map);  
     }catch(Exception e){  
         e.printStackTrace();  
     }
		return map;  
	   }
}
